// CommentServiceImpl.java
package com.health.information.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.health.information.mapper.CommentMapper;
import com.health.information.domain.Comment;
import com.health.information.domain.CommentVO;
import com.health.information.service.ICommentService;

@Service
public class CommentServiceImpl implements ICommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public Comment selectCommentByCommentId(Long commentId) {
        return commentMapper.selectCommentByCommentId(commentId);
    }

    @Override
    public List<CommentVO> selectCommentVOList(Long postId) {
        return commentMapper.selectCommentVOList(postId);
    }

    @Override
    public int insertComment(Comment comment) {
        return commentMapper.insertComment(comment);
    }

    @Override
    public int updateComment(Comment comment) {
        return commentMapper.updateComment(comment);
    }

    @Override
    public int deleteCommentByCommentIds(Long[] commentIds) {
        return commentMapper.deleteCommentByCommentIds(commentIds);
    }

    @Override
    public int deleteCommentByCommentId(Long commentId) {
        return commentMapper.deleteCommentByCommentId(commentId);
    }
}